package com.lxs.common.exception;

/**
 * 异常编码：5位，前两位业务码，后三位错误码
 * 10：通用，11：产品，12，订单，13，会员
 */
public enum BizCodeEnum {
    VALID_EXCEPTION(10000,"参数错误"),
    UNKNOWN_EXCEPTION(10001,"未知异常信息"),
    VALID_SMS_EXCEPTION(10002,"短信发送频率太高，稍等一会发送!"),
    PRODUCT_UP_EXCEPTION(11001,"商城上架异常"),
    NO_STOCK_EXCEPTION(14001,"商品锁定库存失败"),
    USERNAME_EXSIT_EXCEPTION(15001,"用户名存在"),
    PHONE_EXSIT_EXCEPTION(15002,"手机号存在"),
    USERNAME_PHONE_VALID_EXCEPTION(15003,"账号或者密码错误");
    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    private int code;
    private String msg;
    BizCodeEnum(int code ,String msg){
        this.code=code;
        this.msg=msg;
    }

}
